import request from '@/utils/request'

export function getChapterList(data) {
    // 获取章节列表
    return request({
        url: '/chapter/getPageList',
        method: 'post',
        data
    })
}
    //获取章节树形结构
export function  getChapterTree(data){
    return request({
        url: '/chapter/getTree',
        method: 'post',
        data
    })
}

export function addChapter(data) {
    // 添加章节
    return request({
        url: '/chapter/save',
        method: 'post',
        data
    })
}

export function editChapter(data) {
    // 修改章节
    return request({
        url: '/chapter/update',
        method: 'post',
        data
    })
}

export function deleteChapter(data) {
    // 删除章节
    return request({
        url: '/chapter/delete',
        method: 'post',
        data
    })
}